package com.lcq.springbootcreate.project.ExceptionAndEnum;

public enum MallExceptionEnum {
    NEED_PASS_WORD(1002,"密码不能为空"),
    PASSWORD_TOO_SHORT(1003,"密码不能少于8位"),
    NAME_EXISTS(1004,"不允许重名"),
    INSERT_FAILED(1005,"插入失败"),
    SYS_ERROR(2000,"系统异常"),
    UPDATE_FAILED(1008,"更新失败"),
    NEED_LOGIN(1007,"需要登陆"),
    WRONG_PASSWORD(1006,"密码错误"),
    NEED_USER_NAME(1001,"用户名不能为空"), NOT_ADIMIN(1009, "不是管理员"), NAME_NULL(1010,"商品名字为空"), CATEGORY_ADD_SUCCESS(1011, "添加商品成功"), ARGUMENT_WRONG(1012, "参数错误");


    Integer code;
    String msg;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    MallExceptionEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
